Constructive Solid Geometry (CSG) is a method of modeling graphical surfaces whereby more complex surfaces are modeled as a combination of simpler surfaces. For instance, in computer graphics, CSG provides a powerful way for defining surfaces of higher genus (e.g. a sphere with a hole) from surfaces of lower genus, such as a plain cylinder and plain sphere. CSG components including primitives such as cylinders and spheres can be described in terms of a procedure or a function that accepts some number of parameters. For instance, a spherical three-dimensional (3D) surface can be defined procedurally in terms of coordinates of its center and a value of its radius. More complex objects can then be modeled through CSG operations performed using such procedural objects.
Procedural models for 3D surfaces have many desirable characteristics. For instance, they are more compact than polygon meshes or polynomial surface patches (e.g., splines), they are resolution independent and they can be modified at runtime by changing a small number of parameters. Compactness is important for many reasons. For instance, storing a compact representation costs less in terms of memory. Also, a compact representation can be rendered much faster than a larger one, even if much more computation is required to process the compact representation at runtime.
In one method of rendering such procedural surfaces for display, the procedural surface representation is transformed into a mesh of interconnected triangles. This step of computer graphics processing is generally referred to as triangulation or tessellation, for instance. Triangles are preferred because of their simplistic representation and their suitability for rendering. However, triangulating procedural surfaces and storing the data structures describing the triangulated surface model also consumes memory and can be costly for that reason. As a result, it is desirable to perform more tasks related to triangulation at runtime just prior to rendering to a display and thus, avoid costs associated with storing and retrieving data related to triangulated representations of procedural surfaces.